package cn.wsalix.type;


public enum PayTypeEnum {
	weixin("1", "微信支付"),alipay("2", "支付宝支付");
	private String code;
	private String title;

	PayTypeEnum(String code, String title) {
		this.code = code;
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public static PayTypeEnum findByCode(String code) {
		for (PayTypeEnum type : PayTypeEnum.values()) {
			if (type.getCode().equals(code)) {
				return type;
			}
		}
		return null;
	}

}
